<include file="public+header">

{script}
<!--
function saveAccess(){
Dyhb.AjaxSubmit('form1','{:G::U('role/set_app')}');
}
//-->
{/script}

<import file="Js.Vendor.Form.ManySelect" />

{style}
<!--
.dyhbManySelect {
    overflow: auto;
    border: 2px inset white;
}
.dyhbManySelect_option {
    border-bottom: 1px solid #eeeeee;
    font: 10pt Tahoma;
    padding: 1px;
    padding-left: 20px;
}
// -->
{/style}

   <!-- 标题  -->
   <div class="title"><lang>项目授权</lang> ( <a href="{:G::U('role/index')}"><lang>返回角色列表</lang></a> | <a href="{:G::U('role/user?id='.$nGroupId )}"><lang>用户授权</lang></a> )</div>

  <!-- 正文 -->
  <div id="content" class="content">
      <form method="post" id="form1" name='form1'>
      <table class="form-table full">
          <tr>
            <th valign="top"><label for="access"><lang>授权</lang>：</label></th>
            <td class="importent"><span><lang>应用授权</lang></span> | <a id="access" href="{:G::U('role/module?group_id='.$nGroupId )}"><lang>模块授权</lang></a> | <a href="{:G::U('role/action?group_id='.$nGroupId )}"><lang>操作授权</lang></a>
          </tr>
          <tr>
            <th valign="top"><label for="group_id"><lang>当前组</lang>：</label></th>
            <td><select id="group_id" name="group_id" onchange="location.href = '__ACTION__/group_id/'+this.options[this.selectedIndex].value;" ondblclick="" class="field" >
                <option value="" ><lang>选择组</lang></option>
                <foreach for=arrGroupList>
                   <option value="{$key}" {if $nSelectGroupId==$key}selected="selected"{/if}>{$value}</option>
                </foreach>
                </select>
                <div class="description"><lang>系统组列表，下拉选择</lang></div>
            </td>
          </tr>
          <tr>
            <th valign="top"><label for="groupAppId"><lang>项目</lang>：</label></th>
            <td><select id="groupAppId" name="groupAppId[]" ondblclick="" onchange="" multiple="multiple" class="field" size="15" style="width: 200px; height: 200px">
                <foreach for=arrAppList>
                <option {if in_array( $key,$arrGroupAppList )}selected="selected"{/if} value="{$key}">{$value}</option>
                </foreach>
                </select>
                <div class="description"><lang>选中应用的模块列表</lang></div>
            </td>
          </tr>
          <tr>
            <th valign="top"><label for="field"><lang>操作</lang>：</label></th>
            <td><input type="button" onclick="selectAll()" value="<lang>全 选</lang>" class="field">&nbsp;
             <input type="button" onclick="inverSelect()" value="<lang>反 选</lang>" class="field">&nbsp;
             <input type="button" onclick="unSelectAll()" value="<lang>全 否</lang>" class="field">&nbsp;
             <input type="button" onclick="saveAccess()" value="<lang>保 存</lang>" class="field">&nbsp;
             <input type="hidden" name="group_id" VALUE="{$nGroupId}" >
             <input type="hidden" name="access_module" value="node">
             <input type="hidden" name="ajax" VALUE="1">
            </td>
          </tr>

          </table>
        </form>
   </div>
   <!-- end content -->

<include file="public+footer">